#include <bits/stdc++.h>
using namespace std;
int a[114514], n, x, cnt;
bool k[114514], d[114514];
int main(){
    freopen("duel.in", "r", stdin);
    freopen("duel.out", "w", stdout);
    cin >> n;
    cnt = n;
    for (int i = 1; i <= n; i ++){
        cin >> x;
        a[i] = x;
    }
    sort(a + 1, a + n + 1);
    int l = 1, r = 2;
    while (1){
        if (a[l] < a[r] && !k[r]){
            d[l] = k[l] = k[r] = 1;
            l ++;
            r ++;
        }
        else r ++;
        if (r > n) break;
    }
    for (int i = 1; i <= n; i ++) cnt -= d[i];
    cout << cnt;
    return 0;
}
